From bb86668db55fa24f275c8f56ddd4dcb44cd413fe Mon Sep 17 00:00:00 2001 From: Stefano Stabellini Date: Tue, 29 May 2012 16:36:53 +0100 Subject: [PATCH] xl: destroy the disk on successful removal during block-detach main_blockdetach needs to call libxl_device_disk_destroy so that all the disk related entries are properly removed from xenstore. Signed-off-by: Stefano Stabellini Acked-by: Ian Jackson Committed-by: Ian Campbell --- tools/libxl/xl_cmdimpl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 259b065487..040cefcc35 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -5405,7 +5405,8 @@ int main_blockdetach(int argc, char **argv) } if (libxl_device_disk_remove(ctx, domid, &disk, 0)) { fprintf(stderr, "libxl_device_disk_remove failed.\n"); - } + } else + libxl_device_disk_destroy(ctx, domid, &disk); return 0; } -- 2.30.2